/**
 * @description blog 数据模型
 */
const seq = require('../seq')
const {
  INTEGER,
  STRING,
  TEXT,
  BOOLEAN
} = require('../type')

const Blog = seq.define('Blog', {
  userId: {
    type: INTEGER,
    allowNull: false,
    comment: '用户ID'
  },
  title: {
    type: STRING,
    allowNull: false,
    comment: '标题'
  },
  content: {
    type: TEXT,
    allowNull: false,
    comment: '内容'
  },
  image: {
    type: STRING,
    comment: '封面图',
  },
  comment: {
    type: INTEGER,
    content: '评论数'
  },
  check: {
    type: INTEGER,
    content: '文章被查看'
  },
  type: {
    type: STRING,
    content: '类型'
  }
})

module.exports = Blog